//
//  Task.m
//  TimeTracker
//
//  Created by rodrigop on 31.03.09.
//  Copyright BD Software 2009. All rights reserved.
//
//

#import "Task.h"


@implementation Task

@synthesize taskName;
@synthesize description;
@synthesize startDate;
@synthesize dueDate;

-(id) init {
	
	if (self = [super init]) {
		[self setStartDate: [NSDate date]];
		[self setDescription: @""];
		[self setTaskName: @""];
		[self setDueDate: [NSDate dateWithTimeIntervalSinceNow: (NSTimeInterval) 86400]]; //Se supone que es un dia
	}
	
	return self;
}

- (id) initWithName:(NSString*) name {

	if (self = [super init]) {
		[self setStartDate: [NSDate date]];
		[self setDescription: @""];
		[self setTaskName: name];
		[self setDueDate: [NSDate dateWithTimeIntervalSinceNow: (NSTimeInterval) 86400]]; //Se supone que es un dia
	}
	
	return self;
	
}

- (void) dealloc
{
	[taskName release];
	[description release];
	[startDate release];
	[dueDate release];
	[super dealloc];
}

@end
